// components/tabbar/tabbar.js
Component({
    properties: {
        tabbarData: {
            type: Array,
            value: []
        }
    },
    data: {
        currentIndex: 0
    },
    methods: {
        itemTap(e) {
            let index = e.currentTarget.dataset.index;
            this.setData({
                currentIndex: index
            })

            this.triggerEvent("indexChange",index)
        }
    }
})